package cn.msxb.clustersession.service.impl;

import cn.msxb.clustersession.dao.ResumeDao;
import cn.msxb.clustersession.pojo.Resume;
import cn.msxb.clustersession.service.ResumeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ResumeServiceImpl implements ResumeService {

    @Autowired
    private ResumeDao resumeDao;


    @Override
    public List<Resume> queryAllResume() {
        List<Resume> all = resumeDao.findAll();
        all.forEach(System.out::println);
        return all;
    }

    @Override
    public void deleteById(Long id) {
        resumeDao.deleteById(id);
    }

    @Override
    public Resume save(Resume resume) {
        Resume save = resumeDao.save(resume);
        return save;
    }
}
